import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import Common from './assets/js/common.js'

import './plugins/element.js'

import './plugins/vant.js'
import './plugins/iview.js'

import config from '@/config'


/* import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css'


Vue.use(ViewUI); */


Vue.prototype.$common = Common;
Vue.prototype.$config = config;

Vue.config.productionTip = false;








/* 全局导航守卫 */
router.beforeEach((to, from, next) => {

	if (store.getters.user == null) {

		if (to.path == '/xundeng') {
			
			next("/login");
		} else {
			next();
		}
	} else {
		next();
	}



})




new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
